package com.ming.service.impl;

import com.ming.mapper.CountMapper;
import com.ming.mapper.SumMapper;
import com.ming.pojo.LastSevenCount;
import com.ming.pojo.Sum;
import com.ming.service.CountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CountServiceImpl implements CountService {

    @Resource
    private CountMapper countMapper;

    @Resource
    private SumMapper sumMapper;

    @Override
    public List<LastSevenCount> getByEnterTime() {
        return countMapper.getByEnterTime();
    }

    @Override
    public List<LastSevenCount> getByLeaveTime() {
        return countMapper.getByLeaveTime();
    }

    @Override
    public List<Integer> getTypeCount(){
        return countMapper.getTypeCount();
    }

    @Override
    public Sum getSum() {
        return sumMapper.getSum();
    }
}
